﻿-- Function: GuardarError(character,character,integer,character,character)

-- DROP FUNCTION GuardarError(character,character,integer,character,character)

CREATE OR REPLACE FUNCTION GuardarError(character,character,integer,character,character)
  RETURNS integer AS
$BODY$

DECLARE
	Modulo		ALIAS FOR $1;
	Funcion		ALIAS FOR $2;
	Empleado	ALIAS FOR $3;
	Sentencia	ALIAS FOR $4;
	ErrorSql	ALIAS FOR $5;
	
BEGIN
	insert into sysError(modulo,funcion,empleado,sentencia,errorsql) values(Modulo,Funcion,Empleado,Sentencia,ErrorSql);
	return 1;
END;
$BODY$
  LANGUAGE plpgsql VOLATILE
